package com.qf.web.exs;

import com.qf.pojo.ResultEnum;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class BusinessException extends RuntimeException{

    protected ResultEnum resultEnum;

    public BusinessException(ResultEnum resultEnum) {
        super();
        this.resultEnum = resultEnum;
    }

    public BusinessException(String message, ResultEnum resultEnum) {
        super(message);
        this.resultEnum = resultEnum;
    }

    public BusinessException(String message, Throwable cause, ResultEnum resultEnum) {
        super(message, cause);
        this.resultEnum = resultEnum;
    }

    public BusinessException(Throwable cause, ResultEnum resultEnum) {
        super(cause);
        this.resultEnum = resultEnum;
    }

    protected BusinessException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, ResultEnum resultEnum) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.resultEnum = resultEnum;
    }
}
